import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { BorrowCardService } from './borrow_card.service';
import { CreateBorrowCardDto } from './dto/create-borrow_card.dto';
import { UpdateBorrowCardDto } from './dto/update-borrow_card.dto';

@Controller('borrow-card')
export class BorrowCardController {
  constructor(private readonly borrowCardService: BorrowCardService) {}

  @Post()
  create(@Body() createBorrowCardDto: CreateBorrowCardDto) {
    return this.borrowCardService.create(createBorrowCardDto);
  }

  @Get()
  findAll() {
    return this.borrowCardService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.borrowCardService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateBorrowCardDto: UpdateBorrowCardDto) {
    return this.borrowCardService.update(+id, updateBorrowCardDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.borrowCardService.remove(+id);
  }
}
